#ifndef CPPTUT_PLAYGROUND_HPP_INCLUDED
#define CPPTUT_PLAYGROUND_HPP_INCLUDED

#include <boost/noncopyable.hpp>

struct SDL_Surface;

namespace cpptut
{
	class playground : boost::noncopyable
	{
	public:
		playground(
			unsigned width,
			unsigned height,
			unsigned zoom);
		unsigned width() const;
		unsigned height() const;
		bool is_running() const;
		void set_pixel(
			unsigned x,
			unsigned y,
			unsigned r,
			unsigned g,
			unsigned b);
		void update_screen();
		void process_input();
		void set_zoom(unsigned factor);
		unsigned zoom() const;
      int show();
		~playground();
	private:
		bool running_;
		unsigned const width_, height_;
		unsigned zoom_;
		SDL_Surface *surface_;
		void set_pixel_lowlevel(
			unsigned x,
			unsigned y,
			unsigned r,
			unsigned g,
			unsigned b);
	};
}

#endif
